﻿namespace builderDesignMode.Decoretor
{
    public class PayCallBack : IPayCallBack
    {
        /// <summary>
        /// 支付回调
        /// </summary>
        public void CallBack()
        {
            Console.WriteLine("数据库写入支付处理信息");
            //支付回调 需要扩招新功能 则会修改原来的代码 违背开闭原则
            //SendEmail();
            //SendSmS();
        }

        /// <summary>
        /// 发送邮件
        /// </summary>
        public void SendEmail() 
        {
            Console.WriteLine("发送短信");
        }

        /// <summary>
        /// 发送短信
        /// </summary>
        public void SendSmS() 
        {
            Console.WriteLine("发送邮件");
        }
    }
}
